home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / src / GLperf3.12-src.lha / GLperf / Polygonl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-01  |  4.0 KB  |  158 lines

  1. /*
  2.  *   (C) COPYRIGHT International Business Machines Corp. 1993
  3.  *   All Rights Reserved
  4.  *   Licensed Materials - Property of IBM
  5.  *   US Government Users Restricted Rights - Use, duplication or
  6.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7.  
  8. //
  9. // Permission to use, copy, modify, and distribute this software and its
  10. // documentation for any purpose and without fee is hereby granted, provided
  11. // that the above copyright notice appear in all copies and that both that
  12. // copyright notice and this permission notice appear in supporting
  13. // documentation, and that the name of I.B.M. not be used in advertising
  14. // or publicity pertaining to distribution of the software without specific,
  15. // written prior permission. I.B.M. makes no representations about the
  16. // suitability of this software for any purpose.  It is provided "as is"
  17. // without express or implied warranty.
  18. //
  19. // I.B.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  20. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL I.B.M.
  21. // BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  22. // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  23. // OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  24. // CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  25. //
  26. // Author:  John Spitzer, IBM AWS Graphics Systems (Austin)
  27. //
  28. */
  29.  
  30. #if (defined(INC_REASON)) && (INC_REASON == INFO_ITEM_STRUCT)
  31. #include "Vertex.h"
  32.     int cullFace;    /* Off, GL_FRONT, GL_BACK */
  33.     int polyStipple;    /* Off or On */
  34.     int twoSided;    /* Off or On */
  35.     int polyModeFront;    /* GL_POINT, GL_LINE, GL_FILL */
  36.     int polyModeBack;    /* GL_POINT, GL_LINE, GL_FILL */
  37.     float facingFront;    /* Percentage of polygons facing frontwards [0.0,1.0] */
  38.     float facingBack;    /* Percentage of polygons facing backwards [0.0,1.0] */
  39.     float aspect;    /* Aspect ratio of object (1.0 is equilateral) */
  40. #elif (defined(INC_REASON)) && (INC_REASON == INFO_ITEM_ARRAY)
  41. #include "Vertex.h"
  42.     {
  43.         Aspect,
  44.     "Aspect",
  45.     offset(aspect),
  46.     RangedFloatOrInt,
  47.     {
  48.         { 0.01 },
  49.         { 100.0 }
  50.     },
  51.         { NotUsed, 1.0 }
  52.     },
  53.     {
  54.         PolygonModeFront,
  55.     "Polygon Rasterization Mode/Front Side",
  56.     offset(polyModeFront),
  57.     Enumerated,
  58.     {
  59.         { GL_POINT,    "GL_POINT" },
  60.         { GL_LINE,    "GL_LINE" },
  61.         { GL_FILL,    "GL_FILL" },
  62.             { End }
  63.     },
  64.         { GL_FILL }
  65.     },
  66.     {
  67.         PolygonModeBack,
  68.     "Polygon Rasterization Mode/Back Side",
  69.     offset(polyModeBack),
  70.     Enumerated,
  71.     {
  72.         { GL_POINT,    "GL_POINT" },
  73.         { GL_LINE,    "GL_LINE" },
  74.         { GL_FILL,    "GL_FILL" },
  75.             { End }
  76.     },
  77.         { GL_FILL }
  78.     },
  79.     {
  80.         PolygonStipple,
  81.     "Polygon Stippling Enabled",
  82.     offset(polyStipple),
  83.     Enumerated,
  84.     {
  85.         { On,    "On" },
  86.         { Off,    "Off" },
  87.             { End }
  88.     },
  89.         { Off }
  90.     },
  91.     {
  92.         TwoSided,
  93.     "Two Sided Lighting",
  94.     offset(twoSided),
  95.     Enumerated,
  96.     {
  97.         { On,    "On" },
  98.         { Off,    "Off" },
  99.             { End }
  100.     },
  101.         { Off }
  102.     },
  103.     {
  104.         CullFace,
  105.     "Cull Face Mode",
  106.     offset(cullFace),
  107.     Enumerated,
  108.     {
  109.         { Off,    "Off" },
  110.         { GL_FRONT,    "GL_FRONT" },
  111.         { GL_BACK,    "GL_BACK" },
  112.         { GL_FRONT_AND_BACK, "FRONT_AND_BACK" },
  113.             { End }
  114.     },
  115.         { Off }
  116.     },
  117.     {
  118.         FacingFront,
  119.     "Fraction of Polygons Facing Front",
  120.     offset(facingFront),
  121.     RangedFloat,
  122.     {
  123.         { 0.0 },
  124.         { 1.0 }
  125.     },
  126.         { NotUsed, 1.0 }
  127.     },
  128.     {
  129.         FacingBack,
  130.     "Fraction of Polygons Facing Back",
  131.     offset(facingBack),
  132.     RangedFloat,
  133.     {
  134.         { 0.0 },
  135.         { 1.0 }
  136.     },
  137.         { NotUsed, 0.0 }
  138.     },
  139. #else  /* INC_REASON not defined, treat as plain include */
  140. #ifndef _Polygonl_h
  141. #define _Polygonl_h
  142.  
  143. #include "Vertex.h"
  144.  
  145.  
  146. typedef struct _Polygonal {
  147. #define INC_REASON INFO_ITEM_STRUCT
  148. #include "Polygonl.h"
  149. #undef INC_REASON
  150. } Polygonal, *PolygonalPtr;
  151.  
  152. void new_Polygonal(PolygonalPtr);
  153. void delete_Polygonal(TestPtr);
  154. int Polygonal__SetState(TestPtr);
  155.  
  156. #endif /* file not already included */
  157. #endif /* INC_REASON not defined */
  158.